package com.deelete.springcloud.service;


import com.deelete.springcloud.pojo.Account;
import com.deelete.springcloud.utils.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@Service
@FeignClient(value = "ali-account-service")
public interface AccountService {

    /**
     * 操作账户
     * @param userId 用户id
     * @param money  金额
     * @return CommonResult
     */
    @PostMapping("/account/cutAccount")
    public CommonResult<Account> CutAccount(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
